        $(function(){
         $("img.smallImage").mouseenter(function(){
          var bigImageURL = $(this).attr("bigImageURL");
          $("img.bigImg").attr("src",bigImageURL);
         });
         $("img.bigImg").load(
          function(){
           $("img.smallImage").each(function(){
            var bigImageURL = $(this).attr("bigImageURL");
            img = new Image();
            img.src = bigImageURL;
            img.onload = function(){ 
             // $("div.img4load").append($(img));
            };
           });  
          }
         );
        });
           $.fn.smartFloat = function() {
             var position = function(element) {
              var top = element.position().top, pos = element.css("position");
              $(window).scroll(function() {
               var scrolls = $(this).scrollTop();
               if (scrolls > top) {
                if (window.XMLHttpRequest) {
                 element.css({
                  position: "fixed",
                  top: 0,
                  left:0
                 });  
                $("#zz").fadeIn();
                $("#menu-bar").css({
                  "box-shadow" : '0px 2px 2px rgba(0,0,0,.3)'
                });

                } else {
                 element.css({
                  top: scrolls
                 });  

                }
               }else {
                element.css({
                 position: pos,
                 top: top
                });   
                $("#zz").fadeOut();
                $("#menu-bar").css({
                  "box-shadow" : 'none'
                });
                

               }
              });
             };
             return $(this).each(function() {
              position($(this));      
             });
};
       